package com.HuiShou.domain;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.HuiShou.common.annotation.Excel;
import com.HuiShou.common.core.domain.BaseEntity;

/**
 * 积分明细对象 user_points_detail
 * 
 * @author lyz
 * @date 2025-03-21
 */
@Data
public class UserPointsDetail implements Serializable {
    private static final long serialVersionUID = 1L;

    /** $column.columnComment */
    @TableId(value = "id")
    private String id;

    /** 用户ID */
    @Excel(name = "用户ID")
    private Long userId;

    /** 变动值（正为收入，负为支出） */
    @Excel(name = "变动值", readConverterExp = "正=为收入，负为支出")
    private BigDecimal changeAmount;

    /** 变动后余额 */
    @Excel(name = "变动后余额")
    private BigDecimal currentBalance;

    /** 类型 */
    @Excel(name = "类型")
    private String type;

    /** 关联业务ID（如订单号或兑换ID） */
    @Excel(name = "关联业务ID", readConverterExp = "如=订单号或兑换ID")
    private String bizId;

    @Excel(name = "备注")
    private String remark;

    /** 创建时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date createdAt;

    public void setId(String id) 
    {
        this.id = id;
    }

    public String getId() 
    {
        return id;
    }
    public void setUserId(Long userId) 
    {
        this.userId = userId;
    }

    public Long getUserId() 
    {
        return userId;
    }
    public void setChangeAmount(BigDecimal changeAmount) 
    {
        this.changeAmount = changeAmount;
    }

    public BigDecimal getChangeAmount() 
    {
        return changeAmount;
    }
    public void setCurrentBalance(BigDecimal currentBalance) 
    {
        this.currentBalance = currentBalance;
    }

    public BigDecimal getCurrentBalance() 
    {
        return currentBalance;
    }
    public void setType(String type) 
    {
        this.type = type;
    }

    public String getType() 
    {
        return type;
    }
    public void setBizId(String bizId) 
    {
        this.bizId = bizId;
    }

    public String getBizId() 
    {
        return bizId;
    }
    public void setCreatedAt(Date createdAt) 
    {
        this.createdAt = createdAt;
    }

    public Date getCreatedAt() 
    {
        return createdAt;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("userId", getUserId())
            .append("changeAmount", getChangeAmount())
            .append("currentBalance", getCurrentBalance())
            .append("type", getType())
            .append("bizId", getBizId())
            .append("remark", getRemark())
            .append("createdAt", getCreatedAt())
            .toString();
    }
}
